package com.taobao.txc.common.util.c;

import java.io.IOException;
import java.io.StringReader;
import java.lang.reflect.Method;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.lang.StringUtils;

public class e
  extends StringUtils
{
  private static final long[] b = { 1L, 10L, 100L, 1000L, 10000L, 100000L, 1000000L, 10000000L, 100000000L, 1000000000L, 10000000000L, 100000000000L, 1000000000000L, 10000000000000L, 100000000000000L, 1000000000000000L, 10000000000000000L, 100000000000000000L, 1000000000000000000L };
  private static Method c;
  public static String a = "trace ";
  
  public static boolean a(String paramString1, String paramString2)
  {
    return a(paramString1, paramString2, 0);
  }
  
  public static boolean a(String paramString1, String paramString2, int paramInt)
  {
    if (paramString1 == null) {
      return paramString2 == null;
    }
    int i = paramString1.length();
    while ((paramInt < i) && (Character.isWhitespace(paramString1.charAt(paramInt)))) {
      paramInt++;
    }
    return a(paramString1, paramInt, paramString2);
  }
  
  public static boolean a(String paramString1, int paramInt, String paramString2)
  {
    return paramString1.regionMatches(true, paramInt, paramString2, 0, paramString2.length());
  }
  
  public static String a(String paramString1, String paramString2, String paramString3, boolean paramBoolean1, boolean paramBoolean2, boolean paramBoolean3, boolean paramBoolean4)
  {
    if (paramString1 == null) {
      return null;
    }
    StringBuffer localStringBuffer = new StringBuffer(paramString1.length());
    StringReader localStringReader = new StringReader(paramString1);
    int i = 0;
    int j = 0;
    int k = -1;
    int m = 0;
    int n = 0;
    try
    {
      while ((n = localStringReader.read()) != -1)
      {
        if (n == 92)
        {
          j = j == 0 ? 1 : 0;
        }
        else if ((k != -1) && (n == paramString3.charAt(k)) && (j == 0))
        {
          i = 0;
          k = -1;
        }
        else if (((m = paramString2.indexOf(n)) != -1) && (j == 0) && (i == 0))
        {
          k = m;
          i = n;
        }
        if ((i == 0) && (n == 47) && ((paramBoolean2) || (paramBoolean1)))
        {
          n = localStringReader.read();
          if ((n == 42) && (paramBoolean1)) {
            for (int i1 = 0; ((n = localStringReader.read()) != 47) || (i1 != 42); i1 = n)
            {
              if (n == 13)
              {
                n = localStringReader.read();
                if (n == 10) {
                  n = localStringReader.read();
                }
              }
              else if (n == 10)
              {
                n = localStringReader.read();
              }
              if (n < 0) {
                break;
              }
            }
          }
          if ((n != 47) || (!paramBoolean2)) {}
        }
        else
        {
          while (((n = localStringReader.read()) != 10) && (n != 13) && (n >= 0))
          {
            continue;
            if ((i == 0) && (n == 35) && (paramBoolean3)) {}
            for (;;)
            {
              if (((n = localStringReader.read()) != 10) && (n != 13) && (n >= 0))
              {
                continue;
                if ((i == 0) && (n == 45) && (paramBoolean4))
                {
                  n = localStringReader.read();
                  if ((n == -1) || (n != 45))
                  {
                    localStringBuffer.append('-');
                    if (n == -1) {
                      break;
                    }
                    localStringBuffer.append(n);
                    break;
                  }
                  while (((n = localStringReader.read()) != 10) && (n != 13) && (n >= 0)) {}
                }
              }
            }
          }
        }
        if (n != -1) {
          localStringBuffer.append((char)n);
        }
      }
    }
    catch (IOException localIOException) {}
    return localStringBuffer.toString();
  }
  
  public static int a(String paramString)
  {
    String str = paramString;
    for (int i = 0; i < str.length(); i++) {
      switch (str.charAt(i))
      {
      case '\t': 
      case '\n': 
      case '\r': 
      case ' ': 
        break;
      default: 
        break label72;
      }
    }
    label72:
    if (str.toLowerCase().startsWith(a, i)) {
      return i + a.length();
    }
    return -1;
  }
  
  public static boolean b(String paramString)
  {
    if ((paramString == null) || (paramString.isEmpty())) {
      return false;
    }
    for (int k : paramString.toCharArray()) {
      if (((k < 48) || (k > 57)) && ((k < 97) || (k > 102)) && ((k < 65) || (k > 70))) {
        return false;
      }
    }
    return true;
  }
  
  public static String[] c(String paramString)
  {
    String[] arrayOfString = new String[2];
    arrayOfString[0] = g.b(paramString, "/*", "*/");
    if ((arrayOfString[0] == null) || (arrayOfString[0].isEmpty()))
    {
      arrayOfString[1] = paramString;
      return arrayOfString;
    }
    arrayOfString[1] = g.a(paramString, "/*", "*/").trim();
    return arrayOfString;
  }
  
  public static int a(ArrayList<Object>[] paramArrayOfArrayList, String paramString1, String paramString2, int paramInt1, int paramInt2, f paramf)
  {
    if (!StringUtils.isEmpty(paramString1)) {
      paramf.a = String.format("/*%s*/ %s", new Object[] { paramString1, paramString2 });
    } else {
      paramf.a = paramString2;
    }
    paramf.b = new ArrayList[paramInt2];
    for (int i = 0; (i < paramInt2) && (i + paramInt1 < paramArrayOfArrayList.length); i++) {
      paramf.b[i] = paramArrayOfArrayList[(i + paramInt1)];
    }
    return paramInt1 + paramInt2;
  }
  
  public static List<f> a(String paramString, ArrayList<Object>[] paramArrayOfArrayList)
  {
    ArrayList localArrayList = new ArrayList();
    int i = 0;
    int j = 0;
    int k = 0;
    int m = 0;
    int i1 = 0;
    int i2 = 0;
    String[] arrayOfString = c(paramString);
    paramString = arrayOfString[1];
    Object localObject;
    for (int n = 0; n < paramString.length(); n++)
    {
      int i3 = paramString.charAt(n);
      if (i3 == 39)
      {
        i++;
      }
      else if (i3 == 34)
      {
        j++;
      }
      else if (i3 == 96)
      {
        k++;
      }
      else if (i3 == 92)
      {
        n++;
      }
      else if (i3 == 63)
      {
        if ((i % 2 == 0) && (j % 2 == 0) && (k % 2 == 0)) {
          i2++;
        }
      }
      else if ((i3 == 59) && (i % 2 == 0) && (j % 2 == 0) && (k % 2 == 0))
      {
        localObject = paramString.substring(m, n);
        if (!StringUtils.isBlank((String)localObject))
        {
          f localf = new f();
          i1 = a(paramArrayOfArrayList, arrayOfString[0], (String)localObject, i1, i2, localf);
          i2 = 0;
          localArrayList.add(localf);
        }
        i = j = k = 0;
        m = n + 1;
      }
    }
    if (n > m)
    {
      String str = paramString.substring(m);
      if (!StringUtils.isBlank(str))
      {
        localObject = new f();
        a(paramArrayOfArrayList, arrayOfString[0], str, i1, i2, (f)localObject);
        localArrayList.add(localObject);
      }
    }
    return localArrayList;
  }
  
  public static List<String> d(String paramString)
  {
    ArrayList localArrayList = new ArrayList();
    int i = 0;
    int j = 0;
    int k = 0;
    int m = 0;
    String[] arrayOfString = c(paramString);
    paramString = arrayOfString[1];
    for (int n = 0; n < paramString.length(); n++)
    {
      int i1 = paramString.charAt(n);
      if (i1 == 39)
      {
        i++;
      }
      else if (i1 == 34)
      {
        j++;
      }
      else if (i1 == 96)
      {
        k++;
      }
      else if (i1 == 92)
      {
        n++;
      }
      else if ((i1 == 59) && (i % 2 == 0) && (j % 2 == 0) && (k % 2 == 0))
      {
        String str2 = paramString.substring(m, n);
        if (!StringUtils.isBlank(str2)) {
          if (!StringUtils.isEmpty(arrayOfString[0])) {
            localArrayList.add(String.format("/*%s*/ %s", new Object[] { arrayOfString[0], str2 }));
          } else {
            localArrayList.add(str2);
          }
        }
        i = j = k = 0;
        m = n + 1;
      }
    }
    if (n > m)
    {
      String str1 = paramString.substring(m);
      if (!StringUtils.isBlank(str1)) {
        if (!StringUtils.isEmpty(arrayOfString[0])) {
          localArrayList.add(String.format("/*%s*/ %s", new Object[] { arrayOfString[0], str1 }));
        } else {
          localArrayList.add(str1);
        }
      }
    }
    return localArrayList;
  }
  
  static
  {
    try
    {
      c = BigDecimal.class.getMethod("toPlainString", new Class[0]);
    }
    catch (NoSuchMethodException localNoSuchMethodException) {}
  }
}


/* Location:           C:\Users\ibm\Downloads\txc-yun-sample (1)\txc-yun-sample\lib\txc-client-2.0.72.jar
 * Qualified Name:     com.taobao.txc.common.util.c.e
 * JD-Core Version:    0.7.0.1
 */